﻿using System;

namespace StaticPublic.iTunesParser {
    public class Program {
        static void Main(string[] args) {
            try {
                ParserOptions options = new ParserOptions(args);
                new LibraryParser(options).Run();

            } catch (ArgumentException ex) {
                ShowUsage(ex.Message);
            }
        }

        static private void ShowUsage(string message) {
            if (!String.IsNullOrEmpty(message)) {
                Console.Error.WriteLine("Error: {0}", message);
            }

            Console.WriteLine("{0}Usage: parselib [inputFile] [outputFile]", Environment.NewLine);
        }
    }
}